package com.jt.controller;

import com.jt.pojo.Role;
import com.jt.service.RoleService;
import com.jt.service.UserService;
import com.jt.vo.PageResult;
import com.jt.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("userRole")
@CrossOrigin
public class UserRoleController {

    @Autowired
    private UserService  userService;


    @Autowired
    private RoleService  roleService;

    @GetMapping("/list")
    public SysResult  getUserRole(PageResult pageResult){
        PageResult userRolePage = userService.getUserRolePage(pageResult);
        return  SysResult.success(userRolePage);
    }


}
